﻿using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;

namespace DW.IntelligenceSource.GUI.Map {
  public class MapPainter {
    public virtual void PaintActiveCountry(Canvas countryCanvas) {
      Brush MouseOverBrush = countryCanvas.FindName("MouseOverBrush") as Brush;
      foreach (Shape child in countryCanvas.Children) {
        child.Fill = MouseOverBrush;
      }
    }

    public virtual void PaintCountry(Country country){
      Brush color = country.DefaultColor ?? new NormalColor().getBrush();
      foreach (Path path in country.Boundaries){
        path.Fill = color;
      }
    }
  }
}